
INC_DIRS	= -I/d/yazy/include 
LIB_DIRS	= -L/d/yazy/lib

LIBS		:= $(LIB_DIRS) \
	-llibboost_test_exec_monitor-mgw-s
CXXFLAGS	:= $(INC_DIRS)
CXX		= g++

COMPILE		:= $(CXX) $(CXXFLAGS) -c

LINK		= $(CXX)

SRCS		:= $(wildcard *.cpp)
OBJS		:= $(SRCS:%.cpp=%.o)
TARGETS		:= $(SRCS:%.cpp=%.exe)

all: $(TARGETS)

test: $(TARGETS)
	@for tgt in $^; do \
		echo; \
		echo "Test:" $$tgt":"; \
		./$$tgt; \
	done;

$(TARGETS): $(OBJS)
	@for tgt in $@; do \
		echo; \
		echo $(LINK) -o $$tgt $${tgt%.exe}.o $(LIBS); \
		$(LINK) -o $$tgt $${tgt%.exe}.o $(LIBS); \
	done;

%.o: %.cpp
	$(COMPILE) -o $@ $<


